-- GENERATED SPELL FOR [Shadowmage] --


function spell0_8550(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20825,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8550', 3000, 1)
end

function spell1_8550(pUnit, Event) --@Shadowform,Self--
pUnit:FullCastSpellOnTarget(16592,pUnit)
pUnit:RegisterEvent('Sorts_8550', 622, 1)
end

function Sorts_8550(pUnit, Event)
local choix_sorts_8550 = math.random(0, 1)
if choix_sorts_8550 == 0 then
pUnit:RegisterEvent('spell0_8550', 1, 1)
end
if choix_sorts_8550 == 1 then
pUnit:RegisterEvent('spell1_8550', 1, 1)
end
end

function mob8550_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8550', math.random(1500, 3000), 1)
end

function mob8550_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8550_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8550_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8550, 1, 'mob8550_Action')
RegisterUnitEvent(8550, 2, 'mob8550_Leave')
RegisterUnitEvent(8550, 3, 'mob8550_Kill')
RegisterUnitEvent(8550, 4, 'mob8550_Die')
